package eureka.consumer;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @Author:RenPu
 * @Date: 2020/8/20 15:58
 * @Version: 1.0
 * @description:
 */

@SpringBootApplication
@EnableDiscoveryClient
public class EurekaConsumerMain {

    public static void main(String[] args) {

        new SpringApplicationBuilder(EurekaConsumerMain.class)
                .web(WebApplicationType.SERVLET)
                .run(args);

    }


    @Bean
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }

}
